const express = require("express")
const app = express()
const port  = 4000
const cookieParser = require('cookie-parser');
const bodyParser = require('body-parser')
//socket需要的服务器
const server = require("http").createServer(app)
require("./socketIO/test")(server)
const router = require('./router')

app.use(bodyParser.urlencoded())
app.use(bodyParser.json())
app.use(cookieParser())
app.use(router)

require('./mongoose/connect')

server.listen(port,()=>{
    console.log('runing ...')

});